import type { App } from "vue";

import Vue3Toasity, { type ToastContainerOptions } from "vue3-toastify";
import { toast } from "vue3-toastify";

import "vue3-toastify/dist/index.css";

// https://vue3-toastify.js-bridge.com/
export function setupToast(app: App) {
  app.use(Vue3Toasity, {
    theme: "dark",
    autoClose: 1000,
    closeButton: false,
    position: "top-center",
    hideProgressBar: true,
    dangerouslyHTMLString: true,
    toastStyle: {
      fontWeight: "600",
    },
    // transition: "slide",

    // closeOnClick: false,
    // style: {
    //   opacity: "0.9",
    //   userSelect: "initial",
    // },
  } as ToastContainerOptions);
}

export { toast };
